package com.config;

import com.aliyun.oss.OSSClient;
import com.util.OSSFile;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

@Configuration
public class OssConfig {
    @Resource
    private OSSFile oSSFile;

    @Bean
    public OSSClient ossClient(){
        return new OSSClient(oSSFile.getEndpoint(),
                oSSFile.getAccessKeyId(),
                oSSFile.getAccessKeySecret());
    }
}
